1. Field of the Invention
The present invention relates to an image processing apparatus and method associated with noise removal of image data.
2. Related Background Art
Conventionally, when image data or the like is to be recorded using a digital recording/reproducing apparatus, data compression is performed as needed to reduce the required storage capacity for the recorded data.
In image data compression, digital image data (generally, a frame image) is divided into blocks each consisting of Mxc3x97N pixels. The block data obtained by block division is transformed by a recursive orthogonal transform (e.g., discrete cosine transform). The orthogonal transform coefficient data obtained upon orthogonal transformation is appropriately subjected to quantization and variable-length coding such that the data amount is reduced, and an image free from a sense of incompatibility can be reconstructed in image data expansion. The data compressed in the above manner is modulated (NRZ modulator) into recordable data and then recorded on a recording medium loaded in the recording circuit.
FIG. 1 is a block diagram showing a conventional digital recording/reproducing apparatus. Referring to FIG. 1, the apparatus comprises an image signal input terminal 1, an A/D converter 2 for performing analog/digital conversion, an image memory 3 for storing image data, an address controller 4 for controlling the write/read addresses of the image memory 3, an orthogonal transform circuit 5 for an performing orthogonal transform such as a DCT (Discrete Cosine Transform) and outputting an orthogonal transform coefficient, a quantization circuit 6 for quantizing the orthogonal transform coefficient, a variable-length coding (VLC) circuit 7 for reducing the data amount of quantized data, a correction code addition circuit 8 for correcting an error in data reproduction, a modulation circuit 9 for minimizing various losses in data recording, and a recording/reproducing unit 10 for recording/reproducing the data.
The apparatus also comprises a demodulation circuit 11 for demodulating the reproduced signal, an error correction circuit 12 for correcting an error with the correction code, an inverse variable-length coding (VLD) circuit 13 for inversely converting the reproduced VLC data into quantized data, an inverse quantization circuit 14 for converting the quantized data into an orthogonal transform coefficient, an inverse orthogonal transform circuit 15 for inversely transforming the orthogonal transform coefficient into the original image data, a D/A converter 16 for performing digital/analog conversion, and an output terminal 17 for outputting the image signal.
The operation will be described below.
In a recording operation, an image signal input to the input terminal 1 is converted into a digital signal by the A/D converter 2 and written at an address of the image memory 3, which is designated by the address controller 4. The address controller 4 controls the addresses such that one frame image is divided in units of blocks each consisting of Mxc3x97N pixels and read out. The block data in units of Mxc3x97N pixels is input to the orthogonal transform circuit 5 and transformed into an orthogonal transform coefficient. The orthogonal transform coefficient data is converted into quantized data by the quantization circuit 6. The quantized data is converted into a variable-length code by the VLC circuit 7. A correction code is added to the coded data by the correction code addition circuit 8. The data is modulated by the modulation circuit 9, input to the recording/reproducing unit 10, and recorded on a recording medium such as a magnetic tape.
In a reproducing operation, the reproduced data output from the recording/reproducing unit 10 is demodulated by the demodulation circuit 11. Error correction is performed using the correction code by the error correction circuit 12, and thereafter, the reproduced data is converted into quantized data by the VLD circuit 13. This quantized data is input to the inverse quantization circuit 14 and converted into orthogonal transform coefficient data, and further transformed into digital image data in units of blocks each consisting of Mxc3x97N pixels by the inverse orthogonal transform circuit 15. This image data is written at an address of the image memory 3, which is designated by the address controller 4. The read addresses of the image memory 3 are controlled by the address controller 4 such that the data in the memory are read along the line direction of the screen. The readout image data is converted into an analog image signal by the D/A converter and output from the output terminal 17.
In the above-described conventional digital recording/reproducing apparatus, quantization of the orthogonal transform coefficient obtained upon block division largely contributes to reduce the code amount of the orthogonal transform coefficient data. However, the DC component of the orthogonal transform coefficient has an error in units of blocks, and consequently, a large visual degradation in image quality, i.e., so-called block distortion appears at the block edge. In such a case, since the block edge is fixed regardless of the image, i.e., a moving picture image or a still picture image, the block distortion always appears at the same position.
In addition to the block distortion, mosquito noise appears near the edge of the image as noise generated by a quantization error.
The present invention has been made in consideration of the above situation, and has as its object to provide an image processing apparatus and method which can minimize a degradation in image quality caused by block distortion and mosquito noise.
In order to achieve the above object, according to an aspect of the present invention, there is provided an image processing apparatus (method) comprising input means (step) for inputting image data which is coded in units of blocks each consisting of a plurality of pixels, decoding means (step) for decoding the image data input to the input means (step), filter means (step) for filtering the image data decoded by the decoding means (step), and control means (step) for adaptively controlling a filtering condition of the filter means (step) for image data at a block boundary.
According to another aspect of the present invention, there is provided an image processing apparatus (method) comprising input means (step) for inputting image data which is coded in units of blocks consisting of a plurality of pixels, decoding means (step) for decoding the image data input to the input means (step), filter means (step) for filtering the image data decoded by the decoding means (step), and selection means (step) for adaptively selecting the number of pixels used for filtering processing by the filter means (step).
According to still another aspect of the present invention, there is provided an image processing apparatus (method) comprising input means (step) for inputting image data which is coded in units of blocks each consisting of a plurality of pixels, decoding means (step) for decoding the image data input to the input means (step), block edge detection means (step) for detecting a block edge of the image data decoded by the decoding means (step), block distortion detection means (step) for detecting block distortion in the image data decoded by the decoding means (step), and filter means (step) for filtering the decoded image data from the decoding means (step) in accordance with outputs from the block edge detection means (step) and the block distortion detection means (step).